package com.itheima.project.feign;

import com.itheima.project.basic.ResponseWrap;
import com.itheima.project.hystrix.SmsSendHystrix;
import com.itheima.project.vo.sms.SendMessageVo;
import com.itheima.project.vo.sms.SmsSendRecordVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @ClassName SmsSendFace.java
 * @Description 邮件发送Face接口
 */
@FeignClient(value = "module-sms-web",fallback = SmsSendHystrix.class)
public interface SmsSendFeign {

    /***
     * @description 发送短信接口:削峰方式
     * @param sendMessageVo 发送对象
     */
    @PostMapping("smsSend/send-sms-mq")
    ResponseWrap<Boolean> sendSmsForMq(SendMessageVo sendMessageVo);

    /***
     * @description 发送短信接口:非削峰方式
     * @param sendMessageVo 发送对象
     */
    @PostMapping("smsSend/send-sms")
    ResponseWrap<Boolean> sendSms(SendMessageVo sendMessageVo);

    /***
     * @description 查询短信接受情况
     * @param smsSendRecordVo 发送记录
     * @return
     */
    @PostMapping("smsSend/query-send-sms")
    ResponseWrap<Boolean> querySendSms(SmsSendRecordVo smsSendRecordVo);

    /***
     * @description 重试发送
     * @param smsSendRecordVo
     * @return
     */
    @PostMapping("smsSend/retry-send-sms")
    ResponseWrap<Boolean> retrySendSms(SmsSendRecordVo smsSendRecordVo);
}
